<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="7"><img src="images/bc1.gif" width="7" height="56" /></td>
        <td style="background:url(images/bc2.gif) repeat-x"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="25" align="center" ><strong style="text-transform:uppercase">{title}</strong></td>
          </tr>
          <tr>
            <td width="77%" class="pathpage"><img src="images/home.gif" width="20" height="20" align="absmiddle" />&nbsp;{pathpage}</td>
          </tr>
        </table></td>
        <td width="8"><img src="images/bc3.gif" width="8" height="56" /></td>
      </tr>
	 
      <tr>
        <td style="background:url(images/bc8.gif) repeat-y"></td>
        <td style="padding-top:5px; padding-bottom:20px"> 
		<!--START BLOCK : msg -->
		<div style="width:100%">{msg}</div>
		<!-- END BLOCK : msg -->
		 <!--START BLOCK : addnewitem -->
		<form name="addnewitem" action="?page=sr_module&code=02" method="post" onsubmit="return checkinputnull();">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
            <tr>
              <td colspan="6" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="84%"><img src="images/01.gif" width="14" height="13" align="absmiddle" />&nbsp;Thêm mới module </td>
                    <td width="16%">&nbsp;</td>
                  </tr>
                </table></td></tr>
            <tr>
              <td width="20%" align="left" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px; padding-left:5px">Tên module </td>
              <td width="66%" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="name" style="width:350px; border:solid #cccccc 1px" id="name" /></td>
            </tr>
		   <tr>
             <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Giá trị </td>
             <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">
               <input type="text" id="gia_tri" name="gia_tri" style="width:350px; border:solid #cccccc 1px" />
             </td>
            </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thứ tự </td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="thu_tu" style="border:solid #cccccc 1px; width:60px; text-align:center" /></td>
	        </tr>
		   
		   
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Kích hoạt</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="checkbox" name="active" value="1"  checked="checked"/></td>
	        </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">&nbsp;</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="submit" name="Submit2" value="Chấp nhận" /><input type="button" name="Submit2" value="Bỏ qua" onclick="window.location='?page=sr_module'"/></td>
	        </tr>
          </table>
		  </form>
		
		<!-- END BLOCK : addnewitem -->
		 <!--START BLOCK : edititem -->
		<form name="addnewitem" action="?page=sr_module&code=04&id={id_module}" method="post" onsubmit="return checkinputnull();">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
            <tr>
              <td colspan="6" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="84%"><img src="images/01.gif" width="14" height="13" align="absmiddle" />&nbsp;Sửa  module </td>
                    <td width="16%">&nbsp;</td>
                  </tr>
                </table></td></tr>
            <tr>
              <td width="20%" align="left" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px; padding-left:5px">Tên module </td>
              <td width="66%" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="name" style="width:350px; border:solid #cccccc 1px" id="name" value="{name}" /></td>
            </tr>
		   <tr>
             <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Giá trị </td>
             <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">
               <input type="text" id="gia_tri" name="gia_tri" style="width:350px; border:solid #cccccc 1px" value="{gia_tri}" />
             </td>
            </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thứ tự </td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="thu_tu" style="border:solid #cccccc 1px; width:60px; text-align:center" value="{thu_tu}" /></td>
	        </tr>
		   
		   
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Kích hoạt</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="checkbox" name="active" value="1"  {active}/></td>
	        </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">&nbsp;</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="submit" name="Submit2" value="Chấp nhận" /><input type="button" name="Submit2" value="Bỏ qua" onclick="window.location='?page=sr_module'"/></td>
	        </tr>
          </table>
		  </form>
		
		<!-- END BLOCK : edititem -->
		<!-- START BLOCK : cell_list -->
		<form name="listitem" action="?page=sr_module&code=06" method="post">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
          <tr>
            <td colspan="7" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="84%"><img src="images/book.gif" width="18" height="15" />&nbsp;Danh sách nhóm </td>
                <td width="16%" class="pathpage"><strong><a href="?page=sr_module&code=01">Thêm module mới </a></strong></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td width="3%" align="center" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px"><input name="ALLITEM1" type="checkbox" class="active" id="ALLITEM1" value="1" onClick="checkAll(1,'ALLITEM1')" />
      <input name="del_id" type="hidden"  /></td>
            <td width="66%" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><strong>Tên</strong></td>
            <td width="8%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px"><strong>Giá trị </strong></td>
            <td width="8%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px"><strong>Thứ tự</strong></td>
            <td width="9%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px"><strong>Kích hoạt</strong></td>
            <td width="8%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px"><strong>Sửa</strong></td>
            <td width="6%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px"><strong>Xóa</strong></td>
          </tr>
		  <!-- START BLOCK : list_module -->
		   <tr>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px"><input name="delitem_1" type="checkbox" class="active"  value="1" /></td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><img src="images/book.gif" width="18" height="15" />&nbsp;<strong>{name}</strong></td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding:2px">{gia_tri}</td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding:2px"><input type="text" name="thu_tu_{id_module}" style="border:solid #cccccc 1px; width:60px; text-align:center" value="{thu_tu}" /></td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px"><input name="active_{id_module}" type="checkbox" class="style1" value="1" {active} /></td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px"><a href="?page=sr_module&code=03&id={id_module}"><img src="images/write.gif" width="15" height="15" border="0" /></a></td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px"><a href="javascript:confirmdelitem('{id_module}');"><img src="images/delete.gif" width="16" height="16" border="0" /></a></td>
		   </tr>
		   <!-- END BLOCK : list_module -->
          <tr>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px"><input name="ALLITEM2" type="checkbox" class="active" id="ALLITEM2"  onClick="checkAll(3,'ALLITEM2')" value="1"/></td>
            <td bgcolor="#FAFAFA"  style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px" ><a href="#" class="menuleft" style="color:red"><strong>Xóa mục đã chọn</strong></a></td>
            <td colspan="3" align="center" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px"><input type="submit" name="Submit" value="Lưu" /></td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
          </tr>
          <tr>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
          </tr>
        </table>
		</form>
        <!-- END BLOCK : cell_list -->
	    </td>
        <td style="background:url(images/bc4.gif) repeat-y"></td>
      </tr>
      <tr>
        <td><img src="images/bc7.gif" width="7" height="5" /></td>
        <td style="background:url(images/bc6.gif) repeat-x"></td>
        <td><img src="images/bc5.gif" width="8" height="5" /></td>
      </tr>
    </table>
	
	
	<script type="text/javascript">
		function checkinputnull(){
			
			if(document.getElementById('name').value==''){
				alert("Bạn phải nhập vào tên module!");
				document.getElementById('name').focus();
				return false;
			}
			if(document.getElementById('gia_tri').value==''){
				alert("Bạn phải nhập vào giá trị module!");
				document.getElementById('gia_tri').focus();
				return false;
			}
		}
		function confirmdelitem(id){
			if (confirm('Ban that su muon xoa '))
			{
				document.location="?page=sr_module&code=05&id="+id;
			}
		}
	</script>